﻿@using GameSchool.HtmlHelpers
@using GameSchool.Models.AccountModels
@model GameSchool.ViewModels.Project.GradeViewModel
@{
    ViewBag.Title = "Einkunnagjöf fyrir verkefni";
}
<h2>
    Einkunnagjöf fyrir @Model.currentCourse.Code, @Model.currentCourse.Name, @Model.currentCourse.Semester.Year-@Model.currentCourse.Semester.SemesterOfYear</h2>
<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
@using (Html.BeginForm(htmlAttributes: new { @class = "form-horizontal" }))
{
    
    <div>
        <fieldset>
            <legend>Verkefnaupplýsingar</legend>
            <div class="control-group">
                @Html.LabelFor(m => m.projectReturns.StudentUserID, new { @class = "control-label" }, "Nemandi")
                <div class="controls">
                    @AccountProfile.GetProfileByUserId(Model.projectReturns.StudentUserID).FullName
                </div>
            </div>
            <div class="control-group">
                @Html.LabelFor(m => m.projectReturns.ReturnDate, new { @class = "control-label" }, "Skilað")
                <div class="controls">
                    @Html.DisplayTextFor(m => m.projectReturns.ReturnDate)
                </div>
            </div>
            <div class="control-group">
                @Html.LabelFor(m => m.project.Description, new { @class = "control-label" }, "Lýsing verkefnis")
                <div class="controls">
                    @Html.DisplayTextFor(m => m.project.Description)
                </div>
            </div>
            <div class="control-group">
                @Html.LabelFor(m => m.project.GradePercentage, new { @class = "control-label" }, "Vægi einkunnar")
                <div class="controls">
                    @string.Format("{0:P0}", Model.project.GradePercentage)
                </div>
            </div>
            <div class="control-group">
                @Html.LabelFor(m => m.projectReturns.ReturnComment, new { @class = "control-label" }, "Athugasemd nemanda")
                <div class="controls">
                    @Html.DisplayTextFor(m => m.projectReturns.ReturnComment)
                </div>
            </div>
            <div class="control-group">
                @Html.LabelFor(m => m.projectReturns.ReturnedFileName, new { @class = "control-label" }, "Skilaskrá")
                <div class="controls">
                    @Html.DisplayTextFor(m => m.projectReturns.ReturnedFileName)
                </div>
            </div>
        </fieldset>
    </div>
}
@using (Html.BeginForm(htmlAttributes: new { @class = "form-horizontal" }))
{
    <div class="control-group">
        @Html.LabelFor(m => m.projectReturns.GradeComment, new { @class = "control-label" }, "Athugasemd")
        <div class="controls">
            @Html.TextAreaFor(m => m.projectReturns.GradeComment, new { @class = "input-xxlarge", rows = "8" })
            @Html.ValidationMessageFor(m => m.projectReturns.GradeComment)
        </div>
    </div>
    <div class="control-group">
        @Html.LabelFor(m => m.projectReturns.Grade, new { @class = "control-label" }, "Einkunn")
        <div class="controls">
            @Html.TextBoxFor(m => m.projectReturns.Grade, new { @class = "input-small" })
            @Html.ValidationMessageFor(m => m.projectReturns.Grade)
        </div>
    </div>
    <div class="form-actions">
        <input type="submit" class="btn btn-primary" value="Uppfæra einkunn" />
        <a href="@Url.Action("Result", new { id = Model.project.ProjectID })" class="btn">
            Til baka í niðurstöðulista</a>
    </div>
}
